package edu.yourl.application;

import org.apache.wicket.Request;
import org.apache.wicket.protocol.http.WebSession;

import edu.yourl.domain.User;

public class YourlSession extends WebSession{

	private static final long serialVersionUID = 1L;
	
	private String nick;

	public YourlSession(Request request) {
		super(request);
		this.nick = null;
	}
	
	public boolean isSignedIn() {
		return this.nick != null;
	}
	
	public String getUserNick() {
		return this.nick;
	}

	public void setUser(User user) {
		this.nick = user.getNickname();
	}
	
	public void removeUserInfo() {
		this.nick = null;
	}

}
